The present invention relates to a method and an apparatus for performing automatic focus when a specimen is observed or image-processed by using an optical microscope, and particularly relates to a method and an apparatus for detecting image contrast of a specimen in order to attain automatic focus.
The present invention is applicable, for example, to a very small size measuring apparatus, a line width measuring apparatus, an external appearance examining apparatus, and so on. Examples of subjects to be measured or examined include a magnetic pole surface of a write/read magnetic head to be used in a hard disk unit, a circuit pattern on a semiconductor integrated circuit, etc.
Heretofore detection of image focus is attained by detecting a high-frequency component of a measurement portion on a subject to be examined. Specifically, an image from an optical microscope is picked up with a TV camera. Then, all the contour components of a target portion to be examined on the thus obtained image are extracted, and the total sum of the extracted contour components is adopted as a focus detection signal. In an optical microscope apparatus shown in FIG. 7, which is a typical prior out automatic focusing apparatus, reference numeral 1 represents an XY-direction movable specimen table; 2, a specimen; 3, an objective lens; 4, an imaging lens; 5, a photo-electric conversion sensor; 36, an image processor; 7, a video monitor; 8, an illuminator; 9, a beam splitter; 40, an optical microscope; 13, a driving motor; and 14, a microscope up/down moving mechanism (moving in Z-axis direction). In FIG. 7, while the specimen 2 mounted on the specimen table 1 is observed with the optical microscope 40, a video signal is output from the photoelectric conversion sensor 5 such as a TV camera or the like disposed on an imaging plane of the imaging lens 4. Contour components of the video signal are processed in the processor 36 so as to form a focus component signal. On the basis of the focus component signal, the microscope up/down moving mechanism 14 is moved up/down by the driving motor 13 so that focusing is carried based on that a position where an image contrast signal has a maximum is regarded as a focal point. An example of automatic focusing control will be described with reference to FIG. 8. FIG. 8 is a diagram for explaining the relation between a microscope focus position and an image contrast signal. First, the microscope up/down moving mechanism 14 is moved, while an image contrast signal Fk for each Zk between Zo to Zm in the microscope focusing direction is obtained. Of the obtained image contrast signals Fo to Fm, a maximum value Fmax is detected. The microscope up/down moving mechanism 14 is moved from Zm toward Zo at a constant speed while the image contrast signal Fk is obtained again and monitored as to whether it is equal to the maximum value Fmax or not. The microscope up/down moving mechanism 14 is stopped at a position where Fk is equal to Fmax. This stop position is an in-focus position.
Although a high-frequency component of a video signal is usually used as a contrast signal, the component includes a noise component. An accurate focal point cannot be obtained if the noise component exists. Generally, a noise clip is provided to remove a noise component. However, when the amplification factor is increased to obtain an image contrast signal F, the noise component is beyond a noise clip level, so that the noise component is undesirably contained in the image contrast signal F.
For such a reason, there is a possibility that the noise component contained as an image contrast component affects the detection of the intended image contrast. Thus, the prior art has such a disadvantage.
It is an object of the present invention to solve such a problem and provide an image contrast detection method having no influence of noise, and a focusing method which is suitable for a microscope.
Further, it is another object of the present invention to make it possible to detect image contrast stably when magnification is changed (that is, when an objective lens is changed) and when a component extraction range is changed.
In order to attain the foregoing objects, according to the present invention, only a contour component, as a subject to be detected, is produced on the basis of a difference between an original image (original video signal from a TV camera) and a delayed image (delayed signal of the original video signal) formed by delaying the original image by a predetermined delay time for the purpose of eliminating a noise component, and a difference between a maximum and a minimum levels of a contour component signal representing the contour component is adopted as image contrast.
One feature of the present invention is that the delay time is preset in accordance with the magnification depending on an objective lens in use of a microscope because it is necessary to make the delay time suitable in accordance with the magnification depending on the objective lens in use of the microscope when the contour component is detected.